package com.yang.webapi.auth.filter;

import com.yang.security.filter.FilterInterface;
import org.assertj.core.util.Lists;
import org.springframework.stereotype.Component;

import java.util.Collection;


/**
 * Created by baipan
 * Date: 2019-12-18
 * 过滤规则接口实现类
 */
@Component
public class FilterInterfaceServerImpl implements FilterInterface {


    /**
     * 白名单URL列表
     */
    @Override
    public Collection<String> permits() {
        return Lists.newArrayList(
//                "/**",    //当全部接口放开访问时这样写
                "/*.html",
                "/favicon.ico",
                "/css/**",
                "/js/**",
                "/fonts/**",
                "/layui/**",
                "/img/**",
                "/webjars/**",
                "/swagger-resources/**",
                "/v2/api-docs/**",
                "/statics/**",
                "/login/**",
                "/shop/priority",
                "/shop/shopId",
                "/product/list",
                "/title/title",
                "/product/details",
                "/actuator/health"
        );
    }


    /**
     * 需要认证URL列表
     */
    @Override
    public Collection<String> authenticates() {
        return Lists.emptyList();
    }

}
